<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<%
String path = request.getContextPath();
String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
%>

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
  <head>
    <base href="<%=basePath%>">
    
    <title>My JSP 'index4.jsp' starting page</title>
    
	<meta http-equiv="pragma" content="no-cache">
	<meta http-equiv="cache-control" content="no-cache">
	<meta http-equiv="expires" content="0">    
	<meta http-equiv="keywords" content="keyword1,keyword2,keyword3">
	<meta http-equiv="description" content="This is my page">
	<!--
	<link rel="stylesheet" type="text/css" href="styles.css">
	-->

  </head>
  
  <body>
  	<form id="loginform" action="logincheck.jsp">
    	账号 ：<input name="txt_name" type="text"><br>
    	密码： <input name="txt_pass" type="password"><br>
    		<input type="submit" value="登陆" ><br>
 	 </form>
    <script type="text/javascript">
    var now=new Date();
    var year=now.getYear();
    var month=now.getMonth();
    var day=now.getDate();
    var hours=now.getHours();
    var minutes=now.getMinutes();
    var seconds=now.getSeconds();
    document.all.show.innerHTML=""+year+"年"+month+"月"+day+"日 "+hours+":"+minutes+":"+seconds+"";
    document.write(""+year+"年"+month+"月"+day+"日 "+hours+":"+minutes+":"+seconds+"");
  	var a=0;
  	alert(a);
  	console.log(a);
  	var al=new Array();
  	a[0]=1;
  	a[2]=2.2;
  	for(var i=0;i<al.length;i++){
  	 alert(al);
  	 console.log(al);
  	 }
  	document.getElementById("loginform");
  	alert(form1);
  	console.log(form1);
  	var name=document.getElementById("text_name").value();
  	var pass=document.getElementById("text_pass").value();
  	console.log(name);
  	if (name=="admin"&&pass=="123456")
		form.submit;
  	else
		window.open(error.jsp);
  </script>
  </body>
</html>
